// import request from '@/utils/request';

import { getAuthority } from '@/utils/authority';
import { User } from '@/domains/user';

const admin: User = {
  userid: '00000001',
  name: 'admin',
  title: 'admin',
  group: 'admin',
  avatar: 'https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png',
  signature: '',
  email: '',
  tags: [],
  country: '',
  geographic: {},
  address: '',
  phone: '',
};

export async function queryCurrent(): Promise<any> {
  const auth = getAuthority();
  if (auth && auth[0] === 'admin') {
    return admin;
  }
  return {};
  // return request('/api/currentUser');
}
